home *** CD-ROM | disk | FTP | other *** search
/ Champak 54 / Vol 54.iso / games / x_valin.swf / scripts / DefineSprite_129 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-10-01  |  577 b   |  29 lines

  1. if(getProperty("../jug", _X) == _X and getProperty("../jug", _Y) == _Y)
  2. {
  3.    set("_root.jug:t",-50);
  4.    set("_root.jug:dx",0);
  5.    set("_root.jug:dy",0);
  6.    tellTarget(_root.audio.points)
  7.    {
  8.       gotoAndPlay(2);
  9.    }
  10.    locx = new Array(536,568,600);
  11.    locy = new Array(37,53,69);
  12.    mx = locx[random(2)];
  13.    my = locy[random(2)];
  14.    tellTarget("../felipe")
  15.    {
  16.       gotoAndPlay(10);
  17.    }
  18. }
  19. dx = (mx - _X) / 10;
  20. dy = (my - _Y) / 10;
  21. _X = _X + dx;
  22. _Y = _Y + dy;
  23. if(dx != 0 or dy != 0)
  24. {
  25.    _alpha = _alpha - 5;
  26. }
  27. z = int(_Y - 5);
  28. swapdepths(z);
  29.